home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
language
/
pcl_src.zoo
/
8-28-88-notes.txt
< prev
next >
Wrap
Text File
|
1988-09-01
|
21KB
|
538 lines
Copyright (c) Xerox Corporation 1988. All rights reserved.
These notes correspond to the "8/24/88 (beta) AAAI PCL" version of PCL.
Please read this entire document carefully.
There have been a number of changes since the 8/2/88 version of PCL. As
usual, these changes are part of our efforts to make PCL conform with
the CLOS specicification (88-002R). This release contains the big
changes which the 7/7 through 8/2 releases were really getting ready
for.
This version of PCL has been tested at PARC in the following Common
Lisps:
Symbolics 7.2
Coral 1.2
Lucid 3.0
Franz ??
Xerox Lyric
Xerox Medley (aka EnvOS Medley)
KCL (October 15, 1987)
Most of the changes in this version of PCL fall into one of two
categories.
The first major set of changes makes the order of arguments to setf
generic functions and methods conform with the spec. In addition, these
changes allow the first argument to defmethod to be of the form (SETF
<symbol>).
The second major set of changes have to do with slot access and instance
structure. Importantly, PCL now checks to see if a slot is bound, and
calls slot-unbound if the slot is unbound. This is a major change from
previous releases in which slot access just returned NIL for slots which
had not yet been set. These changes affect all the functions which
access the slots of an instance. In addition, the generic functions
which are called by the slot access functions in exceptional
circumstances are affected. This set of changes also include the
implemenentation of the real initialization protocol as specified by
88-002R.
In addition, there are a number of other changes. The most significant
of these has to do with the symbols which the PCL package exports by
default.
The rest of this document goes on to first describe the slot access
changes, then describe the setf generic function changes, and finally
describe some of the other minor changes.
At the very end of this file is a new section which lists PCL features
which are scheduled to disappear in future releases. Please read this
section and take it to heart. This features will be disappearing.
*** Changes to slot access and instance structure ***
This release includes a number of changes to the way slot access works
in PCL. Some of these changes are incompatible with old behavior. Code
which was written with the actual CLOS spec in mind should not be
affected by these incompatible changes, but some older code may be
affected.
The basic thrust of the changes to slot access is to bring the following
functions and generic functions in line with the specification:
slot-boundp
slot-exists-p
slot-makunbound
slot-missing
slot-unbound
slot-value
slot-boundp-using-class
slot-exists-p-using-class
slot-makunbound-using-class
slot-value-using-class
(setf slot-value)
(setf slot-value-using-class)
change-class
make-instances-obsolete
make-instance (temporarily called *make-instance)
initialize-instance (temporarily called *initialize-instance)
reinitialize-instance
update-instance-for-different-class
update-instance-for-redefined-class
shared-initialize
In this release, these functions accept the specified number of
arguments, return the specified values, have the specified effects, and
are called by the rest of PCL in the specified way at the specified
times (with the exception that PCL does not yet call *make-instance to
create its own metaobjects). Because PCL now checks for unbound slots,
you may notice a slight performance degradation in certain applications.
For complete information, you should of course see the CLOS specification.
The rest of this note is a short summary of how this new behavior is
different from the last release.
- Dynamic slots are no longer supported. Various functions like
slot-value-always and remove-slot no longer exist. Also,
slot-value-using-class now only accepts the three arguments as
described in the spec. The two extra arguments having to do with
dynamic slots are no longer accepted.
Shortly, we will release a metaclass which provides the now missing
dynamic slot behavior.
- slot-missing now receives and accepts different arguments.
- slot-unbound is now implemented, and is called at the appropriate
times.
- the initialization protocol specified in 88-002R is now almost
completely implemented. The only difference is that the current
implementation does not currently check the validity of initargs.
So, no errors are signalled in improper initargs are supplied.
Because of name conflicts with the two other initialization protocols
PCL currently supports, some of the specified initialization functions
do not have their proper name. The mapping between names in the
specification and names in this version of PCL is as follows:
SPECIFIED IN PCL
make-instance *make-instance
initialize-instance *initialize-instance
reinitialize-instance <has proper name>
update-instance-for-different-class <has proper name>
update-instance-for-redefined-class <has proper name>
shared-initialize <has proper name>
In a future release of PCL, these functions will have their proper
names, and all the old, obsolete initialization protocols will
disappear.
Convert to using this new wonderful initialization protocol soon.
Sometime soon we will release a version of PCL which does significant
optimization of calls to make-instance. This should speed up instance
creation dramatically, which should significantly improve the
performance of some programs.
- The function all-slots no longer exists. There is a new generic
function called slots-to-inspect, which controls the default behavior
of describe. It also controls the default behavior of the inspector
in ports which have connected their inspectors to PCL. It specifies
which slots of a given class should be inspected. See the definition
in the file high.lisp for more.
- the metaclass obsolete-class no longer exists. The mechanism by which
instances are marked as being obsolete is now internal, as described
in the spec. The generic-function make-instances-obsolete can be used
to force the instances of a class to go through the obsolete instance
update protocol (see update-instance-for-redefined-class).
- all-std-class-readers-miss-1, a generic function which was part of
the database interface code I sent out a few weeks ago, has a slightly
different argument list. People using the code I sent out a few weeks
ago should replace the definition there with:
(defmethod all-std-class-readers-miss-1
((class db-class) wrapper slot-name)
(declare (ignore wrapper slot-name))
())
- The implementation of the slot access generic functions have been
considerably streamlined. The impenetrable macrology which used to be
used is now gone.
- Because the behavior of the underlying slot access generic functions
has changed, it is possible that some user code which hacks the
underlying instance structure may break. Most of this code shouldn't
break though. There have been some questions on the mailing list
about what is the right way to modify the structure of an instance.
I am working on that section of chapter 3 right now, and will answer
those questions sometime soon.
*** Changes to SETF generic functions ***
This release of PCL includes a significant change related to the order
of arguments of setf generic functions. To most user programs, this
change should be invisible. Your program should run just fine in the
new version of PCL. Even so, there is some conversion you should do to
your program, since DEFMETHOD-SETF is now obsolete and will be going
away soon.
Some programs may take some work to adapt to this change. This will
be particularly true o